package com.market.dao;

import java.util.List;

import com.market.domain.Picture;
import com.market.domain.Product;
import com.market.domain.ProductInfo;
import com.market.domain.PurchaseSchedule;

public interface ProductDao extends GenericDao<Product, Long> {
	
	/**
	 * This method find all organic products 
	 * @return
	 */
	public List<Product> findAllOrganicProducts();
	
	
	/**
	 * This method find all products that product type is TOFU
	 * @return
	 */
	public List<Product> findAllTofuProducts();
	
	
	/**
	 * This method find all products that inventory > zero and  Not fresh food
	 * @return
	 */
	public List<Product> findAllNotFreshHaveInventory();
	
	/**
	 * This method find all products that inventory > zero
	 * @return
	 */
	public List<Product> findAllHaveInventory();
	
	/**
	 * This method find all products that active weekly related.
	 * @return
	 */
	public List<Product> findActiveWeeklyProducts();
	
	/**
	 * This method load all pictures associated to products;
	 * @param product
	 * @return
	 */
	public List<Picture> findPictures(Product product);
	
	/**
	 * This method load all purchase schedule associated with this product.
	 * @param user
	 * @return
	 */
	public List<PurchaseSchedule> findPurchaseSchedules(Product product);
	
	/**
	 * This method load extended product information associated with this product.
	 * @param user
	 * @return
	 */
	public ProductInfo findProductInfo(Product product);
	
	/**
	 * This method inventory for specific product
	 * @param productID
	 * @return
	 */
	
	public Integer findInventory(Long productID);
	
	/**
	 * Update specific product to new Inventory
	 * 
	 * @param productID
	 * @param newInventory
	 */
	public void saveInventory(Product product);
	
	
	/**
	 * Update specific product's price information, include price, specialPrice, unitPrice, chineseUnitPrice, frenchUnitPrice.
	 * 
	 * unitPrice(eg. 0.85/lb)
	 * @param product
	 */
	public void savePriceInfo(Product product);
}
